<template>
  <div class="app-container" style="margin-top: -25px">
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
        >选择物料</el-button>
      </el-col>
    </el-row>
    <el-table  v-loading="loading"  :summary-method="getSummaries" show-summary
               :data="itembzinfoList" @selection-change="handleSelectionChange"
               row-key="id" :max-height="tableHeight" @cell-mouse-leave="cellHandleclick" :row-class-name="tableRowClassName" >
      <el-table-column label="标准代码" fixed="left"  align="center" prop="itemBzCode" />
      <el-table-column label="标准名称" fixed="left"  align="center" prop="itemBzName" />
      <el-table-column label="规格型号" fixed="left"  align="center" prop="spec" />
      <el-table-column label="物料名称" fixed="left"   align="center" prop="itemName" />
      <el-table-column label="法兰外径D"   align="center" prop="flwjD" width="120"/>
      <el-table-column label="法兰内径"   align="center" prop="flnj" />
      <el-table-column label="法兰厚度C(含台高)"   align="center" prop="flhdC"  width="150"/>
      <el-table-column label="法兰台高f"  align="center" prop="fltgF" />
      <el-table-column width="120" label="材料成本价(元)" align="center" prop="clcbj">
        <template slot-scope="scope">
          <div style="display:flex">
            <el-input @input.native="roChange(scope.row,'clcbj')"  id="clcbjId" clearable style="display:inline" v-model="scope.row.clcbj"></el-input>
          </div>
        </template>
      </el-table-column>
      <el-table-column width="120" label="加工成本价(元)" align="center" prop="jgcbj">
        <template slot-scope="scope">
          <div style="display:flex">
            <el-input @input.native="roChange(scope.row,'jgcbj')" id = "jgcbjId" clearable style="display:inline"v-model="scope.row.jgcbj"></el-input>
          </div>
        </template>
      </el-table-column>
      <el-table-column width="120" label="密封槽成本价(元)" align="center" prop="mfccbj">
        <template slot-scope="scope">
          <div style="display:flex">
            <el-input @input.native="roChange(scope.row,'mfccbj')"  id = "mfccbjId" clearable style="display:inline"v-model="scope.row.mfccbj"></el-input>
          </div>
        </template>
      </el-table-column>
      <el-table-column width="120" label="订单数量系数" align="center" prop="ddslxs">
        <template slot-scope="scope">
          <div style="display:flex">
            <el-input @input.native="roChange(scope.row,'ddslxs')"  clearable style="display:inline"v-model="scope.row.orderNumCoe"></el-input>
          </div>
        </template>
      </el-table-column>
      <el-table-column width="120" label="加工难度系数" align="center" prop="jgndxs">
        <template slot-scope="scope">
          <div style="display:flex">
            <el-input @input.native="roChange(scope.row,'jgndxs')"  clearable style="display:inline"v-model="scope.row.processDiffCoe"></el-input>
          </div>
        </template>
      </el-table-column>
      <el-table-column width="120" label="合计成本价(元)" align="center" prop="hjcbj">
        <template slot-scope="scope">
          <div style="display:flex">
<!--           <span style="text-align: center">{{caculate(scope.row) | numFilter}}</span>-->
            <el-input  clearable style="display:inline"v-model="scope.row.hjcbj"></el-input>
          </div>
        </template>
      </el-table-column>
      <el-table-column label="下料重量(kg)" align="center" prop="xlzl" width="100">
        <template slot-scope="scope">
          <div style="display:flex">
            <!--           <span style="text-align: center">{{caculate(scope.row) | numFilter}}</span>-->
            <el-input  clearable style="display:inline"v-model="scope.row.xlzl" @input="changeText(scope.row)"></el-input>
          </div>
        </template>
      </el-table-column>
      <el-table-column width="120" label="理论报价(元)" align="center" prop="llbj">
        <template slot-scope="scope">
          <div style="display:flex">
<!--            <span style="text-align: center">{{caculate2(scope.row) | numFilter}}</span>-->
            <el-input  clearable style="display:inline"v-model="scope.row.llbj"></el-input>
          </div>
        </template>
      </el-table-column>
      <el-table-column width="120" label="实际报价(元)" align="center" prop="sjbj">
        <template slot-scope="scope">
          <div style="display:flex">
            <el-input  clearable style="display:inline"v-model="scope.row.sjbj"></el-input>
<!--            <span style="text-align: center">{{caculate2(scope.row) | numFilter}}</span>-->
          </div>
        </template>
      </el-table-column>
      <el-table-column width="120" label="税率" align="center" prop="taxRate">
        <template slot-scope="scope">
          <div style="display:flex">
            <el-input @input.native="roChange(scope.row,'taxRate')" id="taxRateId" clearable style="display:inline"v-model="scope.row.taxRate"></el-input>
          </div>
        </template>
      </el-table-column>
      <el-table-column width="120" label="含税报价(元)" align="center" prop="hsbj">
        <template slot-scope="scope">
          <div style="display:flex">
            <el-input  clearable style="display:inline"v-model="scope.row.hsbj"></el-input>
<!--            <span style="text-align: center">{{caculate3(scope.row) | numFilter}}</span>-->
          </div>
        </template>
        </el-table-column>
      <el-table-column width="120" label="订单数量" align="center" prop="orderNum">
        <template slot-scope="scope">
          <div style="display:flex">
            <el-input  clearable style="display:inline"v-model="scope.row.orderNum"></el-input>
          </div>
        </template>
      </el-table-column>
      <el-table-column label="公称通径DN " align="center" prop="gctjDn" width="140"/>
      <el-table-column label="法兰孔径L" align="center" prop="flkjL" />
      <el-table-column label="钢管外径系列I" align="center" prop="ggwj1" width="140"/>
      <el-table-column label="钢管外径系列Ⅱ" align="center" prop="ggwj2" width="140"/>
      <el-table-column label="法兰孔中心圆直径K" align="center" prop="flkzxyzjK" width="160" />
      <el-table-column label="法兰孔数n" align="center" prop="flksN" />
      <el-table-column label="法兰螺栓规格" align="center" prop="fllsSpec" />
      <el-table-column label="法兰密封面尺寸d" align="center" prop="flmfmccD" />
      <el-table-column label="法兰内径系列I" align="center" prop="flnj1" />
      <el-table-column label="法兰内径系列Ⅱ" align="center" prop="flnj2" />
      <el-table-column width="120" label="法兰理论重量(kg)平面FF系列Ⅱ" align="center" prop="flllzlpm2Ff" />
      <el-table-column label="理论重量" align="center" prop="llzl" />
      <el-table-column label="法兰盖厚度C" align="center" prop="flghdC" />
      <el-table-column label="核定标记" align="center" prop="hdFlag" />
      <el-table-column width="220" label="物料识别码" align="center" prop="itemIdentifyCode" />
      <el-table-column label="备注" align="center" prop="remark" />
      <el-table-column  fixed="right" label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.$index,scope.row)"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <!--选择物料-->
    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="1400px" append-to-body>
      <el-form :model="queryParams2" ref="queryForm2" size="small" :inline="true" v-show="showSearch" label-width="120px">
        <el-form-item label="标准代码" prop="itemBzCode">
          <el-input
            v-model="queryParams2.itemBzCode"
            placeholder="请输入标准代码"
            clearable
            @keyup.enter.native="handleQuery2"
          />
        </el-form-item>
        <el-form-item label="标准名称" prop="itemBzName">
          <el-input
            v-model="queryParams2.itemBzName"
            placeholder="请输入标准名称"
            clearable
            @keyup.enter.native="handleQuery2"
          />
        </el-form-item>
        <el-form-item label="规格型号" prop="spec">
          <el-input
            v-model="queryParams2.spec"
            placeholder="请输入规格型号"
            clearable
            @keyup.enter.native="handleQuery2"
          />
        </el-form-item>
        <el-form-item label="法兰外径" prop="flwjD">
          <el-input
            v-model="queryParams2.flwjD"
            placeholder="请输入法兰外径"
            clearable
            @keyup.enter.native="handleQuery2"
          />
        </el-form-item>
        <el-form-item label="法兰内径" prop="flnj">
          <el-input
            v-model="queryParams2.flnj"
            placeholder="请输入法兰内径"
            clearable
            @keyup.enter.native="handleQuery2"
          />
        </el-form-item>
        <el-form-item label="物料识别码" prop="itemIdentifyCode">
          <el-input
            v-model="queryParams2.itemIdentifyCode"
            placeholder="请输入物料识别码"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery2">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery2">重置</el-button>
        </el-form-item>
      </el-form>
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <el-button
            type="warning"
            plain
            icon="el-icon-upload2"
            size="mini"
            @click="handleImport"
          >导入</el-button>
        </el-col>
      </el-row>
      <el-table :row-key="getRowKeys" :max-height="tableHeight" :data="itembzinfoList2" @selection-change="handleSelectionChange2">
        <el-table-column :reserve-selection='true' type="selection" width="55" align="center" />
        <el-table-column label="公司代码" fixed="left" align="center" prop="tenantId" />
        <el-table-column label="公司名称" fixed="left" align="center" prop="tenantName">
          <template>
            <div>泰康</div>
          </template>
        </el-table-column>
        <el-table-column label="标准名称" fixed="left"  align="center" prop="itemBzName" />
        <el-table-column label="物料名称" fixed="left" align="center" prop="itemName" />
        <el-table-column label="标准代码" fixed="left" align="center" prop="itemBzCode" width="120"/>
        <el-table-column label="规格型号" fixed="left"  show-overflow-tooltip align="center" prop="spec" />
        <el-table-column label="公称压力PN " align="center" prop="gcylPn" />
        <el-table-column label="公称通径DN " align="center" prop="gctjDn" />
        <el-table-column label="法兰外径D" align="center" prop="flwjD" />
        <el-table-column label="法兰内径 " align="center" prop="flnj" />
        <el-table-column label="法兰厚度C" align="center" prop="flhdC" />
        <el-table-column label="法兰密封面尺寸d" align="center" prop="flmfmccD" />
        <el-table-column label="法兰台高f" align="center" prop="fltgF" />
        <el-table-column label="法兰孔中心圆直径K" align="center" prop="flkzxyzjK" />
        <el-table-column label="法兰孔径L" align="center" prop="flkjL" />
        <el-table-column label="法兰孔数n" align="center" prop="flksN" />
        <el-table-column label="理论重量 " align="center" prop="llzl" />
        <el-table-column label="下料重量 " align="center" prop="xlzl" />
        <el-table-column label="计算重量 " align="center" prop="jszl" />
        <el-table-column label="法兰螺栓规格" align="center" prop="fllsSpec" />
        <el-table-column label="法兰理论重量(kg)平面FF系列I" align="center" prop="flllzlpm1Ff" />
        <el-table-column label="法兰理论重量(kg)平面FF系列Ⅱ" align="center" prop="flllzlpm2Ff" />
        <el-table-column label="法兰理论重量(kg)突面RF系列I" align="center" prop="flllzltm1Rf" />
        <el-table-column label="法兰理论重量(kg)突面RF系列IⅡ" align="center" prop="flllzltm2Rf" />
        <el-table-column label="法兰盖理论重量平面FF" align="center" prop="flgllzlpmFf" />
        <el-table-column label="法兰盖理论重量突面RF" align="center" prop="flgllzlpmRf" />
        <el-table-column label="法兰内径系列I" align="center" prop="flnj1" />
        <el-table-column label="法兰内径系列Ⅱ" align="center" prop="flnj2" />
        <el-table-column label="钢管外径 " align="center" prop="ggwj" />
        <el-table-column label="钢管外径系列I" align="center" prop="ggwj1" />
        <el-table-column label="钢管外径系列Ⅱ" align="center" prop="ggwj2" />
        <el-table-column label="法兰盖厚度C" align="center" prop="flghdC" />
        <el-table-column label="核定标记" align="center" prop="hdFlag" />
        <el-table-column  width="220" label="物料识别码" align="center" prop="itemIdentifyCode" />
        <el-table-column label="备注" align="center" prop="remark" />
      </el-table>
      <pagination
        v-show="total2>0"
        :total="total2"
        :page.sync="queryParams2.pageNum"
        :limit.sync="queryParams2.pageSize"
        @pagination="getList2"
      />

      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">选 择</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
      <el-upload
        ref="upload"
        :limit="1"
        accept=".xlsx, .xls"
        :headers="upload.headers"
        :action="upload.url + '?updateSupport=' + upload.updateSupport"
        :disabled="upload.isUploading"
        :on-progress="handleFileUploadProgress"
        :on-success="handleFileSuccess"
        :auto-upload="false"
        drag
      >
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
        <div class="el-upload__tip text-center" slot="tip">
          <!--  <div class="el-upload__tip" slot="tip">
              <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
            </div>-->
          <span>仅允许导入xls、xlsx格式文件。</span>
          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
        </div>
      </el-upload>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitFileForm">确 定</el-button>
        <el-button @click="upload.open = false">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
  import { addBZItemInfo } from "@/api/sales/price";
  import { getWarehouseTree } from "@/api/base/warehouseinfoKuwei";
  import { listItembzinfo, getItembzinfo, delItembzinfo, addItembzinfo, updateItembzinfo } from "@/api/base/itembzinfo";
  import {getToken} from "@/utils/auth";
  export default {
    components: {
    },
    name: "RukuinfoAdd",
    data() {
      return {
        itembzinfoList:[],
        itembzinfoList2:[],
        // 遮罩层
        loading: true,
        // 选中数组
        ids: [],
        ids2: [],
        itemIds: [],
        // 非单个禁用
        single: true,
        single2: true,
        // 非多个禁用
        multiple: true,
        multiple2: true,
        // 显示搜索条件
        showSearch: true,
        // 总条数
        total: 0,
        total2:0,
        // 入库详情表格数据
        rukuinfoAddList: [],
        //库区
        kuqu: [],
        //库位
        kuwei: [],
        warehouseinfo:[],
        // 表格的高度
        tableHeight: document.documentElement.scrollHeight - 245 + "px",
        // 弹出层标题
        title: "",
        // 是否显示弹出层
        open: false,
        ifChangeXlzlValue: [],
        // 查询参数
        queryParams: {
          pageNum: 1,
          pageSize: 10,
          mainId: null,
          rukuNum: null,
          rukuDate: null,
          itemName: null,
          itemId: null,
          supplyId: null,
          supplyName: null,
          stockId: null,
          stockName: null,
          price: null,
          classId: null,
          className: null,
          danhao:null,
        },
        queryParams2:{
          pageNum: 1,
          pageSize: 10,
          itemBzCode: null,
          itemBzName: null,
          spec: null,
          flwjD: null,
          flnj1: null,
          flnj2: null,
          itemIdentifyCode: null,
        },
        // 表单参数
        form: {},
        form2:{},
        // 物料导入参数
        upload: {
          // 是否显示弹出层（物料导入）
          open: false,
          // 弹出层标题（物料导入）
          title: "导入标准物料",
          // 是否禁用上传
          isUploading: false,
          // 是否更新已经存在的用户数据
          updateSupport: 0,
          // 设置上传的请求头部
          headers: { Authorization: "Bearer " + getToken() },
          // 上传的地址
          url: process.env.VUE_APP_BASE_API + "/base/itembzinfo/importData"
        },
        // 表单校验
        rules: {
        }
      };
    },
    created() {
      getWarehouseTree().then(response => {
        this.warehouseinfo = response.data;
      });
    },
    filters: {
      numFilter (value) {
        // 截取当前数据到小数点后两位
        let realVal = parseFloat(value).toFixed(2)
        return realVal
      }
    },
    methods: {
      cellHandleclick(row, column, cell, event) {
        //如果规定点击某一列执行，利用column中的label属性
      //   if(column.label === '材料成本价(元)' && row.index == 0) {
      //     this.itembzinfoList.forEach(item=>{
      //       item.clcbj = row.clcbj
      //     })
      //   }
      //   if(column.label === '加工成本价(元)' && row.index == 0) {
      //     this.itembzinfoList.forEach(item=>{
      //       item.jgcbj = row.jgcbj
      //     })
      //   }
      //
      //   if(column.label === '密封槽成本价(元)' && row.index == 0) {
      //     this.itembzinfoList.forEach(item=>{
      //       item.mfccbj = row.mfccbj
      //     })
      //   }
      //
      //   if(column.label === '税率' && row.index == 0) {
      //     this.itembzinfoList.forEach(item=>{
      //       item.taxRate = row.taxRate
      //     })
      //   }
      },

      tableRowClassName({row, rowIndex}){
        row.index = rowIndex
      },

      /** 搜索按钮操作 */
      handleQuery2() {
        this.queryParams2.pageNum = 1;
        this.getList2();
      },
      /** 重置按钮操作 */
      resetQuery2() {
        this.resetForm("queryForm2");
        this.handleQuery2();
      },
      // 多选框选中数据
      handleSelectionChange2(selection) {
        this.ids2 = selection.map(item => item.id)
        this.single2 = selection.length!==1
        this.multiple2 = !selection.length
      },
      /** 查询物料标准明细列表 */
      getList2() {
        listItembzinfo(this.queryParams2).then(response => {
          this.itembzinfoList2 = response.rows;
          this.total2 = response.total;
        });
      },
      getRowKeys(row) {
        //记录每行的key值
        return row.id;
      },
      roChange(row,type){
        console.log(row,"row");
        row.sjbj = row.llbj
        // (data[i].sjbj/(1-data[i].taxRate)).toFixed(2)
        row.hsbj = (row.sjbj/(1-row.taxRate)).toFixed(2);

      },
      getSummaries(param) {
        const { columns, data } = param;
        const sums = [];
        columns.forEach((column, index) => {
          if (index === 0) {
            sums[index] = '总计';
            return;
          }
          if (index === 1 || index === 2 || index === 3  || index === 4 || index === 5 || index === 6 || index === 7 )  {
            return '';
          }
          for(var i=0 ;i<data.length;i++){
            data[i].hjcbj =
              (parseFloat(data[i].clcbj)+parseFloat(data[i].jgcbj)+parseFloat(data[i].mfccbj) +(parseFloat(data[i].clcbj)+parseFloat(data[i].jgcbj))*parseFloat(data[i].orderNumCoe)
              +(parseFloat(data[i].clcbj)+parseFloat(data[i].jgcbj))*parseFloat(data[i].processDiffCoe)).toFixed(2);

            data[i].llbj = (data[i].hjcbj*data[i].xlzl).toFixed(2);

            // data[i].hsbj = (data[i].sjbj/(1-data[i].taxRate)).toFixed(2);

            data[i].flThick = data[i].flhdC-data[i].fltgF;

            // data[i].sjbj = data[i].llbj
          }
          const values = data.map(item => Number(item[column.property]));
          if (!values.every(value => isNaN(value))) {
            sums[index] = values.reduce((prev, curr) => {
              const value = Number(curr);
              if (!isNaN(value)) {
                if(index==4){
                  return prev + curr
                }else{
                  return this.keepTwoDecimalFull(Number(prev) + curr);
                }
              } else {
                return prev;
              }
            }, 0);
            sums[index];
          } else {
            sums[index] = '';
          }
        });

        return sums;
      },
      keepTwoDecimalFull(num) {
        var result = parseFloat(num);
        if (isNaN(result)) {
          alert('传递参数错误，请检查！');
          return false;
        }
        result = Math.round(num * 100) / 100;
        var s_x = result.toString(); //将数字转换为字符串

        var pos_decimal = s_x.indexOf('.'); //小数点的索引值


        // 当整数时，pos_decimal=-1 自动补0
        if (pos_decimal < 0) {
          pos_decimal = s_x.length;
          s_x += '.';
        }

        // 当数字的长度< 小数点索引+2时，补0
        while (s_x.length <= pos_decimal + 2) {
          s_x += '0';
        }
        return s_x;
      },
      // 取消按钮
      cancel() {
        this.open = false;
        this.reset();
      },
      // 表单重置
      reset() {
        this.form = {
          id: null,
          mainId: null,
          rukuNum: null,
          rukuDate: null,
          itemName: null,
          itemId: null,
          supplyId: null,
          supplyName: null,
          stockId: null,
          stockName: null,
          price: null,
          classId: null,
          className: null,
          createBy: null,
          createTime: null,
          updateBy: null,
          updateTime: null,
          remark: null
        };
        this.resetForm("form");
      },
      /** 搜索按钮操作 */
      handleQuery() {
        this.queryParams.pageNum = 1;
        this.getList();
      },
      /** 重置按钮操作 */
      resetQuery() {
        this.resetForm("queryForm");
        this.handleQuery();
      },
      /*重置列表*/
      rukuinfoAddListReset(data){
        this.itembzinfoList =[];
        this.loading = false;
      },
      /*修改*/
      rukuinfoUpdateListReset(data){
        this.itembzinfoList =[];
        data.warehouse=data.kuweiCode
        this.itembzinfoList.push(data);
        this.loading = false;
      },

      // 多选框选中数据
      handleSelectionChange(selection) {
        this.ids = selection.map(item => item.id)
        this.single = selection.length!==1
        this.multiple = !selection.length
      },
      /** 新增按钮操作 */
      handleAdd() {
        this.reset();
        this.open = true;
        this.title = "选择物料信息";
        this.itemIds=[];
        if(this.itembzinfoList.length>0){
          this.itembzinfoList.map((item) => {
            this.itemIds.push(item.itemId);
          })
        }
        setTimeout(() => {
          this.getItemInfoList(this.itemIds,null);
        }, 5);
      },
      getItemInfoList(codesParams,classId){
        this.queryParams2.codesParams=codesParams;
        this.queryParams2.classId=classId;
        this.getList2();
      },
      /** 提交按钮 */
      submitForm() {
        const id =this.ids2;
        addBZItemInfo(id).then(response => {
          response.data.map((item)=>{
            this.itembzinfoList.push(item)
            var result = [];
            var obj = {};
            for(var i =0; i<this.itembzinfoList.length; i++){
              if(!obj[this.itembzinfoList[i].id]){
                result.push(this.itembzinfoList[i]);
                obj[this.itembzinfoList[i].id] = true;
              }
            }
            this.itembzinfoList = result
            // let newArr = []
            // for(let i = 0;i<this.itembzinfoList.length;i++){
            //   newArr.indexOf(this.itembzinfoList[i]) === -1 ? newArr.push(this.itembzinfoList[i]) : newArr
            // };
            // this.itembzinfoList = newArr
          })
        });
        this.open = false;
      },
      /** 删除按钮操作 */
      handleDelete(index,row) {
        this.itembzinfoList.splice(index,1);

      },

      changeText(row) {
        let param = {
          id:row.id,
          xlzl:row.xlzl
        };
        this.ifChangeXlzlValue.push(param);
      },
      /** 导入按钮操作 */
      handleImport() {
        this.upload.title = "物料导入";
        this.upload.open = true;
      },
      /** 下载模板操作 */
      importTemplate() {
        this.download('base/itembzinfo/importTemplate', {
        }, `itembzinfo${new Date().getTime()}.xlsx`)
      },
      // 文件上传中处理
      handleFileUploadProgress(event, file, fileList) {
        this.upload.isUploading = true;
      },
      // 文件上传成功处理
      handleFileSuccess(response, file, fileList) {
        this.upload.open = false;
        this.upload.isUploading = false;
        this.$refs.upload.clearFiles();
        this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
        this.getList();
      },
      // 提交上传文件
      submitFileForm() {
        this.$refs.upload.submit();
      }
    }
  };
</script>
<style lang="scss" scoped>
  ::v-deep .el-input-number.is-controls-right .el-input-number__increase{
    display: none;
    visibility: hidden;
    width: 10px !important;
    position: fixed;
    top:0;
  }
  ::v-deep .el-input-number.is-controls-right .el-input-number__decrease{
    display: none;
    visibility: hidden;
    position: fixed;
    top:0;
  }
  ::v-deep .el-table .cell{
    /*display: none;*/
    padding-right: 0;
    padding-left: -30px;
  }
</style>
